<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -->
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> -->

<HTML>
<HEAD>
<TITLE>Scgt</TITLE>
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet"
	href="<c:url value="/resources/css/EstiloPpal.css" />" type="text/css" />
	

</HEAD>
<BODY>
	<div id="contenedor">
	<%@include file="partes/Cabecera_Menu.jsp" %>
	
	<div id="contenido">
	<h1>Students Data</h1>
	<form:form action="Usuario.html" method="POST" commandName="usuario">
	<form:input path="id" />
		<table>
			<tr>
				<td>Nombre</td>
				<td><form:input path="nombre" /></td>
			</tr>
			<tr>
				<td>Primer Apellido</td>
				<td><form:input path="apellido1" /></td>
			</tr>
			<tr>
				<td>Segundo Apellido</td>
				<td><form:input path="apellido2" /></td>
			</tr>
			<tr>
				<td>Email</td>
				<td><form:input path="email" /></td>
			</tr>
			<tr>
				<td>Rol</td>
				<td><form:input path="rol.descripcion" /></td>
			</tr>
			<tr>
				<td colspan="2">
				<input type="submit" name="action" value="Add" />
					<input type="submit" name="action" value="Edit" /> <input
					type="submit" name="action" value="Delete" /> <input type="submit"
					name="action" value="Search" /></td>
			</tr>
		</table>
	</form:form>
	<br>
	<table>
		<th>Nombre</th>
		<th>Apellido</th>
		<th>Apellido</th>
		<th>Email</th>
		<th>Rol</th>
		<c:forEach items="${usurioList}" var="usuario">
			<tr>
				<td>${usuario.nombre}</td>
				<td>${usuario.apellido1}</td>
				<td>${usuario.apellido2}</td>
				<td>${usuario.email}</td>
				<td>${usuario.rol.descripcion}</td>
				<td>
					<form name="form1" id="form1" method="post"
						action="<c:url value='Usuario.html'/>">
						<input type="hidden" name="usuarioId" value="${usuario.id} }">
						<button type="submit" name="action" value="Search">
							<img  src="<c:url value="/resources/imagenes/personal-information24.png" />">  <br />
						</button>
						
					</form>
				</td>
				<td>
					<form name="form1" id="form1" method="get"
						action="<c:url value='Usuario.html'/>">
						<input type="hidden" name="usuario" value="${usuario}">
						<input type="hidden" name="usuarioId" value="${usuario.id}">
						<button type="submit" name="action" value="Delete">
							<img  src="<c:url value="/resources/imagenes/packing24.png" />">  <br />
						</button>
					</form>
				</td>
			</tr>
		</c:forEach>
	</table>
	</div>			
	<%@include file="partes/Pie.jsp" %>
	</div>
</BODY>
</HTML>
